
<!-- navbar -->
<nav th:fragment="navbar(index)" class="navbar navbar-default">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="/admin/blog">Sillage</a>
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#index-navbar-collapse">
                <span class="sr-only">切换导航</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
        <div class="collapse navbar-collapse" id="index-navbar-collapse">
            <ul class="nav navbar-nav">
                <li th:class="${index == 0 ? 'active' : ''}">
                    <a th:href="${index == 0 ? '#' : '/index'}">
                        <span class="glyphicon glyphicon-home" aria-hidden="true"></span>
                        首页
                    </a>
                </li>
                <li th:class="${index == 1 ? 'active' : ''}">
                    <a th:href="${index == 1 ? '#' : '/types'}">
                        <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                        分类
                    </a>
                </li>
                <li th:class="${index == 2 ? 'active' : ''}">
                    <a th:href="${index == 2 ? '#' : '/tags'}">
                        <span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
                        标签
                    </a>
                </li>
                <li th:class="${index == 3 ? 'active' : ''}">
                    <a th:href="${index == 3 ? '#' : '/archive'}">
                        <span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span>
                        归档
                    </a>
                </li>
                <li th:class="${index == 4 ? 'active' : ''}">
                    <a th:href="${index == 4 ? '#' : '/resource'}">
                        <span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
                        资源
                    </a>
                </li>
                <li th:class="${index == 5 ? 'active' : ''}">
                    <a th:href="${index == 5 ? '#' : '/about'}">
                        <span class="glyphicon glyphicon-tent" aria-hidden="true"></span>
                        关于
                    </a>
                </li>
            </ul>
            <form action="/search" name="search" class="navbar-form navbar-right" role="search">
                <div class="input-group">
                    <input name="content" type="text" class="form-control" placeholder="搜索...">
                    <span class="input-group-addon">
                        <a onclick="document.forms['search'].submit()" class="glyphicon glyphicon-search" aria-hidden="true"></a>
                    </span>
                </div>
            </form>
        </div>
    </div>
</nav>

<!-- footer -->
<footer th:fragment="footer" class="footer">
    <div class="container">
        <div class="row center">
            <div class="col-sm-3">
                <img class="qrcode img-rounded img-responsive" th:src="@{/image/wechat_qrcode.png}" alt="wechat_qrcode">
            </div>
            <div class="col-sm-1">
                <div class="line hidden-xs"></div>
            </div>
            <div class="col-sm-3">
                <h4>更多作品</h4>
                <a class="center-block" href="https://gitee.com/IllTamer_Gitee">Gitee: IllTamer_Gitee</a>
                <a class="center-block" href="https://github.com/IllTamer">Github: IllTamer</a>
            </div>
            <div class="col-xs-1">
                <div class="line hidden-xs"></div>
            </div>
            <div class="col-sm-4">
                <h4>关于此站</h4>
                <p>IllTamer 的个人博客项目。我希望它像花一样来到你身边，虽终会逝去，但仍留有淡淡余香。</p>
            </div>
        </div>
        <div class="center">
            <hr class="spliter"/>
            <a class="copyright" href="https://beian.miit.gov.cn">鄂ICP备2022008028号-1</a>
        </div>
    </div>
</footer>

<!-- admin-navbar -->
<nav th:fragment="admin-navbar(index)" class="navbar navbar-default">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="/index">Admin</a>
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#index-navbar-collapse">
                <span class="sr-only">切换导航</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
        <div class="collapse navbar-collapse" id="index-navbar-collapse">
            <ul class="nav navbar-nav">
                <li th:class="${index == 0 ? 'active' : ''}">
                    <a th:href="${index == 0 ? '#' : '/admin/blog'}">
                        <span class="glyphicon glyphicon-book" aria-hidden="true"></span>
                        博客
                    </a>
                </li>
                <li th:class="${index == 1 ? 'active' : ''}">
                    <a th:href="${index == 1 ? '#' : '/admin/types'}">
                        <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                        分类
                    </a>
                </li>
                <li th:class="${index == 2 ? 'active' : ''}">
                    <a th:href="${index == 2 ? '#' : '/admin/tags'}">
                        <span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
                        标签
                    </a>
                </li>
<!--                <li th:class="${index == 3 ? 'active' : ''}">-->
<!--                    <a th:href="${index == 3 ? '#' : '/admin/archive'}">-->
<!--                        <span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span>-->
<!--                        归档-->
<!--                    </a>-->
<!--                </li>-->
<!--                <li th:class="${index == 4 ? 'active' : ''}">-->
<!--                    <a th:href="${index == 4 ? '#' : '/admin/about'}">-->
<!--                        <span class="glyphicon glyphicon-tent" aria-hidden="true"></span>-->
<!--                        关于-->
<!--                    </a>-->
<!--                </li>-->
            </ul>
            <div class="dropdown navbar-user-icon hidden-xs">
                <button class="btn dropdown-toggle navbar-right" type="button" id="userMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                    <img class="user-icon img-thumbnail img-circle" th:src="${avatar}" alt="">
                    IllTamer
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="userMenu">
                    <li><a href="#">Action</a></li>
                    <li><a href="#">Another action</a></li>
                    <li><a href="#">Something else here</a></li>
                    <li role="separator" class="divider"></li>
                    <li><a href="/login/out">Login out</a></li>
                </ul>
            </div>
        </div>
    </div>
</nav>
